package leetcodecompetition.S112;

/**
 * @Author: Siantar
 * @Date: 2023-09-02-22:31
 * @Description: 1.0
 */
public class T7021 {
    public boolean canBeEqual(String s1, String s2) {
        return f(s1, s2, 0, 2) && f(s1, s2, 1, 3);
    }

    public boolean f(String s1, String s2, int t1, int t2) {
        if (s1.charAt(t1) == s2.charAt(t1) && s1.charAt(t2) == s2.charAt(t2)) return true;
        if (s1.charAt(t1) == s2.charAt(t2) && s1.charAt(t2) == s2.charAt(t1)) return true;
        return false;
    }
}
